<?php

require_once 'Add/Setup/Account/Show/Abstract.php';

class Add_Setup_Account_Show_Adapter_Ucenter extends Add_Setup_Account_Show_Abstract
{
    public function buildAccountForm()
    {
        $user = Ext_User::getInstance()->show($this->_userId)->buildAccount();
        
        $viewForm = new Ext_View_Form_Setup_Account();
        
        if(isset($user->account->username)){
            $viewForm->getElement('username')->setValue($user->account->username);
        }
        
        if(isset($user->account->email)){
            $viewForm->getElement('email')->setValue($user->account->email);
        }
        
        return $viewForm;
    }
}
